﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="ContactUs.aspx.cs"
    Inherits="Habito.Admini.ContactUs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title></title>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.jbind.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery.treeTable.js"> </script>
    <script src="../../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/jquery.FixedHeadTable.js"> </script>
    <link href="../../Content/jquery.treeTable.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/easyui.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/common.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="../../Scripts/kindeditor-all-min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/kindeditor_zh_cn.js"></script>
    <link rel="stylesheet" href="../../Content/kindeditor_default/default.css" />
    <script type="text/javascript">
        var editor;
        $(document).ready(function () {
            KindEditor.ready(function (K) {
                editor = K.create('textarea[name="Content"]', {
                    resizeType: 1,
                    allowPreviewEmoticons: true,
                    items: ['source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
						'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
						'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
						'superscript', 'clearhtml', 'quickformat', 'selectall', '|',
						'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
						'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
						 'table', 'hr', 'pagebreak',
						'anchor', 'link', 'unlink', '|', 'about']
                });
                editor.insertHtml($("#hidcontent").html());
            });
        });
        function save() {
            var desc = escape(editor.html());
            $.ajax({
                type: 'post',
                url: window.location.href + "?Save=1",
                cache: false,
                data: "description=" + desc,
                success: function () {
                    alert("Contact Us has Saved");
                    location.href("ContactUs.aspx");
                },
                error: function (data) {
                    alert();
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div style="display: none" id="hidcontent">
            <%=ViewState["content"] %></div>
        <div style="width: 90%">
            <input type="button" name="name" value="Save" onclick="save()" />
        </div>
        <div>
            <textarea id="txtContent" name="Content" cols="80" rows="40"></textarea></div>
    </form>
</body>
</html>
